<template>
  <div id="lunbo">
    <van-swipe class="my-swipe" :autoplay="3000" indicator-color="white">
      <van-swipe-item v-for="(item, value) in lunbolist" :key="value">
        <img :src="item.path" alt="" />
      </van-swipe-item>
    </van-swipe>
  </div>
</template>

<script>
import { getLunbo } from "../../utils/api";

export default {
  data() {
    return {
      lunbolist: []
    };
  },
  components: {},

  computed: {},

  mounted() {
    this.getRatedList();
  },

  methods: {
    async getRatedList() {
      const res = await getLunbo();
      // headers: new Headers({
      //   Authorization:`Bearer ${localStorage.getItem('token')}`
      // });
      this.lunbolist = res.result;
    }
  }
};
</script>
<style lang="scss" scoped>
#lunbo {
  width: 100%;
  height: 99px;
  padding: 0 10px;
  box-sizing: border-box;
  .my-swipe {
    border-radius: 20px;
    height: 100%;
    width: 100%;
  }
  .my-swipe .van-swipe-item {
    height: 99px;
    text-align: center;
    img {
      width: 100%;
      height: 100%;
    }
  }
}
</style>
